﻿using VOL.Core.BaseProvider;
using VOL.Core.Utilities;
using VOL.Entity.DomainModels;
using System.Threading.Tasks;
using VOL.Entity.VM;
using Microsoft.AspNetCore.Mvc;
using AutoMapper;
using System.Collections.Generic;
using System;
using VOL.Core.CacheManager;
using Microsoft.AspNetCore.SignalR;
using VOL.System.Services;

namespace VOL.System.IServices
{
    public partial interface ISys_UserService
    {
        Task<ApiResponse> Summary(IMapper _mapper);
        Task<ApiResponse> AddAsync([FromBody] ToDoDto model, IMapper _mapper);
        Task<ApiResponse> DeleteAsync(string id);
        Task<ApiResponse> UpdateAsync([FromBody] ToDoDto model, IMapper _mapper);
        Task<ApiResponse> GetAsync(string id);
        Task<ApiResponse> GetAllAsync([FromQuery] ToDoParameter param, IMapper _mapper);
        Task<ApiResponse> GetINTE_SHELVES([FromQuery] ToDoParameter param, IMapper _mapper);
        Task<ApiResponse> FirstTool([FromQuery] ToDoParameter param, IMapper _mapper);
        Task<ApiResponse> FirstToolEqu(string rfidCode, IMapper _mapper);
        Task<ApiResponse> FirstToolEquNew(string rfidCode, IMapper _mapper);
        Task<ApiResponse> UpdateToolEquByRfid([FromBody] EQU_TOOL_Dto model, IMapper _mapper);
        Task<WebResponseContent> OrderActivation(Equ_TASKVM equ_TASKVM);
        Task<WebResponseContent> OrderCheck(PLAN_WORK_ORDER pLAN_WORK_ORDER);
        Task<WebResponseContent> Flow(PROC_PROCESS taskOptions);
        Task<WebResponseContent> OrderPlanCheck(PLAN_WORK_ORDER pLAN_WORK_ORDER);
        Task<WebResponseContent> Equ_TaskAutoWorkJump(IMapper _mapper,Equ_TaskAuto equ_TASKVM);
        Task<WebResponseContent> Equ_TaskAutoWorkJumpMulti(IMapper _mapper);
        Task<WebResponseContent> Equ_TaskAutoWork(Equ_TASKVM equ_TASKVM);
        Task<WebResponseContent> Equ_MarkTask(Equ_TaskReceive equ_TASKVM);
        Task<WebResponseContent> TaskContinue(Equ_TaskReceive equ_TASKVM);
        Task<WebResponseContent> Taskgenerate(Taskgenerate taskgenerate);
        Task<WebResponseContent> TaskExecuteAgain(Equ_TaskReceive equ_TASKVM,IMapper _mapper);
        Task<WebResponseContent> Sendlog(Equ_TaskReceive equ_TASKVM);
        Task<WebResponseContent> Faultlog(Equ_TaskReceive equ_TASKVM);
        Task<WebResponseContent> PlcGet(EQU_PLCConfig equ_TASKVM);
        Task<WebResponseContent> PlcGetAuto();
        Task<WebResponseContent> Equ_MarkTask(Equ_TaskReceive equ_TASKVM,string type);
        Task<WebResponseContent> Equ_ReturnTask(Equ_TaskReceive equ_TASKVM, IMapper _mapper);
        Task<WebResponseContent> PlcAlignRecordTask (PlcAlignRecordTask plcAlignRecordTask);
        Task<WebResponseContent> Plcequ(Plcequ plcequ);
        Task<WebResponseContent> PlcStart(EQU_TOOL eQU_TOOL);
        Task<WebResponseContent> PlcStartMulti(IHubContext<ChatHub> _hubContext);
        Task<WebResponseContent> PlcOutStock(EQU_TOOL equ_TOOL);
        Task<WebResponseContent> PlcInStock(EQU_TOOL equ_TOOL);
        Task<WebResponseContent> ConsumeMessage(EQU_EQUIPMENT eQU_MQConfig, EQU_PLCConfig eQU_PLCConfig);
        Task<WebResponseContent> PlcVeiwPlan(ICacheService _cacheService);
        Task<WebResponseContent> PlcRestart();
        Task<WebResponseContent> PlcVeiwPlanAuto();
        Task<WebResponseContent> EquIsPing();
        Task<WebResponseContent> LoadToolSate();
        Task<WebResponseContent> PushCart();
        bool IsIpConnect(string ip);
        Task<WebResponseContent> PlcWorkpieceRFID([FromBody] PlcWorkpieceRFID pLAN_WORK);
        Task<WebResponseContent> PlcToolRFIDNoSend([FromBody] PlcToolRFID pLAN_WORK);
        Task<WebResponseContent> PlcToolRFID([FromBody] PlcToolRFID pLAN_WORK);
        WebResponseContent SetToolPlcPaly(EQU_TOOL eQU_TOOL, List<EQU_PLCConfig> li190);
        Task<WebResponseContent> Equ_ReturnTaskOrder(Equ_OrderReceive equ_TASKVM);
        Task<WebResponseContent> Equ_SendTASKReady(int orderCode,decimal width);
        Task<WebResponseContent> Equ_SendTASK(string taskNo, IMapper _mapper);
        WebResponseContent ExePro_MES_Auto_Generate_Task();
        Task<WebResponseContent> LoginEqu(LoginInfo loginInfo);
        Task<WebResponseContent> Login(LoginInfo loginInfo, bool verificationCode = true);
        Task<WebResponseContent> Login(LoginInfo loginInfo);
        Task<WebResponseContent> ReplaceToken();
        Task<WebResponseContent> ModifyPwd(string oldPwd, string newPwd);
        Task<WebResponseContent> GetCurrentUserInfo();

        //
        Task<ApiResponse> GetAllTaskAsync([FromQuery] ToDoParameter param, IMapper _mapper);

        //PLC
        Task<WebResponseContent> GetPLCData(IMapper _mapper);

        //start
        Task<WebResponseContent> Start([FromBody] MANU_EXECUTION taskOptions);
        Task<WebResponseContent> Pause([FromBody] MANU_EXECUTION taskOptions);
        Task<WebResponseContent> Stop([FromBody] MANU_EXECUTION taskOptions);
        Task<WebResponseContent> Termination([FromBody] MANU_EXECUTION taskOptions);
        Task<WebResponseContent> SendEmail();

        INTE_CONFIGURE QueryInteConfigure(string configureName);
    }
}

